<%@ include file="/common/taglibs.jsp"%>

<head>
	<title><fmt:message key='menu.reportcount.r4' /></title>
	<script type="text/javascript"
		src="<c:url value='/ext/scripts/highcharts/highcharts.js'/>">
</script>
	<script type="text/javascript"
		src="<c:url value='/ext/scripts/highcharts/exporting.js'/>">
</script>
	<script type="text/javascript"
		src="<c:url value='/ext/scripts/report/report.js'/>">
</script>
<script type="text/javascript"
		src="<c:url value='/ext/scripts/tab.js'/>">
</script>
	<script type="text/javascript">
function getListByProperties(strvalue) {
	return strvalue.split(',');
}

jQuery(document)
		.ready(
				function() {

					var myDate = new Date();
					var year = myDate.getFullYear();
					var month = myDate.getMonth() + 1;
					if (month < 10) {
						month = "0" + month;
					}
					var date = myDate.getDate();
					if (date < 10) {
						date = "0" + date;
					}
					document.getElementById("endtimeid").value = year + "-"
							+ month + "-" + date;
					myDate.setDate(myDate.getDate() - 6);
					month = myDate.getMonth() + 1;
					if (month < 10) {
						month = "0" + month;
					}
					date = myDate.getDate();
					if (date < 10) {
						date = "0" + date;
					}
					document.getElementById("starttimeid").value = year + "-"
							+ month + "-" + date;

					var countpicvalue = "<fmt:message key='count.pic.info'/>";
					var countterritoryvalue = "<fmt:message key='report.visit.time'/>";
					var countterritoryvalueno = "<fmt:message key='report.visit.timeno'/>";
					var countpiclist = getListByProperties(countpicvalue);
					var countterritorylist = getListByProperties(countterritoryvalue);
					var countterritorynolist = getListByProperties(countterritoryvalueno);
					for ( var i = 0; i < countpiclist.length; i++) {
						jQuery('#countpicid').append(
								"<option value='" + (i + 1) + "'>"
										+ countpiclist[i] + "</option>");
					}
					for ( var i = 0; i < countterritorylist.length; i++) {
						jQuery('#countterritoryid').append(
								"<option value='" + countterritorynolist[i]
										+ "'>" + countterritorylist[i]
										+ "</option>");
					}
					var usernum = "<fmt:message key='count.num'/>";
					var usernumline = "<fmt:message key='count.visit.num'/>";
					var countstr = "<fmt:message key='report.countstr'/>";
					var brands = "<fmt:message key='count.report.brands'/>";
					var titletext = "<fmt:message key='menu.reportcount.r4'/>";
					jQuery("#buttonsearchid").click(
							function() {
								reportvisit("../report/visitpicreport.html",
										titletext, usernum, usernumline,
										countstr, brands);
							});
					reportvisit("../report/visitpicreport.html", titletext,
							usernum, usernumline, countstr, brands);

				});
</script>
</head>

<div id="main">
	<div id="content">
		<div class="box_big" style="padding-bottom: 15px;">
			<div class="box5">
				<table width="800" border="0" cellspacing="0" cellpadding="0"
					class="lable_box">
					<tr>
						<td align="right">
							<fmt:message key="report.visit.visittime" />
							:
						</td>
						<td align="left">
							<input id="starttimeid" name="starttime" type="text" size="12"
								class="time"
								onclick="WdatePicker({dateFmt:'yyyy-MM-dd',lang:'${lang}'})" />
							<fmt:message key="zywx.timefrom" />
							<input id="endtimeid" name="endtime" type="text" size="12"
								class="time"
								onclick="WdatePicker({dateFmt:'yyyy-MM-dd',lang:'${lang}'})" />
						</td>
						<td align="right">
							<fmt:message key="count.pic.company" />
							:
						</td>
						<td align="left">
							<select id="countterritoryid" name="abc"></select>
						</td>
						<td align="right">
							<fmt:message key="count.pic.type" />
							:
						</td>
						<td align="left">
							<select id="countpicid" name="countpic"></select>
						</td>
						<td>
							<input type="button" id="buttonsearchid" class="btn_search"
								value="" />
						</td>
					</tr>
				</table>
			</div>
			<div class="box5">
			
			
			
				<div id="container"
					style="width: 90%; height: 400px; margin: 0 auto"></div>
			</div>
		</div>
	</div>
</div>
